-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update release to build darwin/arm64 binary #5286
Update release to build darwin/arm64 binary #5286
Conversation
We currently build with cgo to enable the fast notify trigger. But dockercore/golang-cross has too old a toolchain to enable CGO for darwin/arm64. So for darwin/arm64 we disable CGO and use notify's kqueue support instead. - Tweak the Makefile variables to allow specifying the Go version, build tags, and CGO_ENABLED on a per os/arch basis. Reorganize the variables on a per os/arch basis. - Use github.com/randall77/makefat to build a multi-arch ("fat") binary for Darwin for those that want it.
Codecov Report
@@ Coverage Diff @@
## master #5286 +/- ##
=======================================
Coverage 71.84% 71.84%
=======================================
Files 392 392
Lines 14219 14219
=======================================
Hits 10215 10215
Misses 3256 3256
Partials 748 748 Continue to review full report at Codecov.
|
Converting this to a draft as I'm not entirely sure if it's worth undertaking a stop-gap measure vs just doing the right thing in the first place. |
Converting this from draft: although using a CGO-less build is a stop-gap measure, it gets a native binary out. A perfect solution can be brought in with #2154. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to build the darwin/arm64 binary, don't have a machine to test the actual binary on though, LGTM!
We normally build with cgo to enable the fast notify trigger. But dockercore/golang-cross has too old a toolchain to enable CGO for darwin/arm64. So for darwin/arm64, disable CGO and use notify's kqueue support instead.
Towards #5042
We currently build with cgo to enable the fast notify trigger. But
dockercore/golang-cross
has too old a toolchain to enable cgo for darwin/arm64. So for darwin/arm64 we disable cgo and use notify's kqueue support instead.This is a stop-gap measure since we need to produce signed binaries anyways (#2154).
This PR:
kqueue
(Fix Darwin build without Cgo rjeczalik/notify#182) and also to pull in bug fixes that are not yet in a release.